﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeBackup.FrmGrid
{
    internal class FrmMainGrid : IGrid
    {
        public bool SelectMode { get; set; }

        public List<GridColumn> Columns { get; set; }

        public FrmMainGrid(GridType gridType)
        {

            switch (gridType)
            {
                case GridType.Grid1:
                    {
                        Grid1();
                        break;
                    }
                case GridType.Grid2:
                    {
                        Grid2();
                        break;
                    }
            }

        }

        private void Grid2()
        {
            SelectMode = false;
            Columns = new List<GridColumn>();

            Columns.Add(new GridColumn { DataPropertyName = "baseName", HeaderText = "資料庫名稱", Width = 200});
            Columns.Add(new GridColumn { DataPropertyName = "cName", HeaderText = "中文名稱", Width = 300 ,Readonly=false});
        }

        private void Grid1()
        {
            SelectMode = false;
            Columns = new List<GridColumn>();

        }
    }
}
